home *** CD-ROM | disk | FTP | other *** search
- #include <time.h>
- #include <sys/types.h>
- #include <sys/timeb.h>
- #include "plot.h"
-
- /* get the local time */
- get_localtime(newtime)
- char newtime[];
- {
- char *ctime();
- time_t time();
-
- int i;
- time_t timeofday;
- char *loctime;
-
- /* get the local time */
- timeofday = time((time_t*)0);
- loctime = ctime(&timeofday);
-
- /* loctime has a '\n' in it, so delete that character */
- i=0;
- while ((loctime[i] != '\n') && (i<MAXCHAR)) {
- newtime[i] = loctime[i];
- i++;
- }
- newtime[i] = '\0';
- }
-
-